﻿package jokers.JAdv {
	import jokers.*;
	import jokers.JAdv.*;
	
	public class JChapter6 extends JChapter {
		//初始化章节
		public override function initChapter():void{
			JPara.timer_total = 121;
			JPara.crystalNum = 7;
					
			JTool.initToolBar();
			JTool.setToolEnable(JTool.TOOL_SEARCH);
			JTool.setToolEnable(JTool.TOOL_BOMB);
		}
		
		//特殊关卡会要求刷新特殊数据
		public override function run():void{
		}
		
		//是否胜利
		public override function isWin():Boolean{
			for(var i:int = 0 ; i < 7 ; i++){
				if(JPara.num_crystal[i] < 3){
					return false;
				}
			}
			return true;
		}
		
		//文字版提醒
		public override function showTips():String{
			var ret:String = "";
			
			ret = "已经消除黄色：" + JPara.num_crystal[JCrystal.CRYSTAL_C_YELLO] + "/3\n";
			ret += "已经消除白色：" + JPara.num_crystal[JCrystal.CRYSTAL_C_WHITE] + "/3\n";
			ret += "已经消除蓝色：" + JPara.num_crystal[JCrystal.CRYSTAL_C_BLUE] + "/3\n";
			ret += "已经消除红色：" + JPara.num_crystal[JCrystal.CRYSTAL_C_RED] + "/3\n";
			ret += "已经消除粉色：" + JPara.num_crystal[JCrystal.CRYSTAL_C_PINK] + "/3\n";
			ret += "已经消除橙色：" + JPara.num_crystal[JCrystal.CRYSTAL_C_ORANGE] + "/3\n";
			ret += "已经消除绿色：" + JPara.num_crystal[JCrystal.CRYSTAL_C_GREEN] + "/3";
			
			return ret;
		}
		
		
	}
}
